package com.xywy.find;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.umeng.analytics.MobclickAgent;
import com.xywy.R;
import com.xywy.common.BaseActivity;
import com.xywy.common.FragmentMainActivity;
import com.xywy.common.constants.ConstantValue;

public class FindActivity extends BaseActivity {
	private RelativeLayout rlJkgc;
	private RelativeLayout rlJkzh;
	private RelativeLayout rlJbzc;
	private RelativeLayout rlRemind;


	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fragment_find);
		initView();
		setListener();
	}

	/**
	 * 事件监听
	 */
	private void setListener() {
		rlJkgc.setOnClickListener(onClickListener);
		rlJkzh.setOnClickListener(onClickListener);
		rlJbzc.setOnClickListener(onClickListener);
		rlRemind.setOnClickListener(onClickListener);
	}

	View.OnClickListener onClickListener = new View.OnClickListener() {
		@Override
		public void onClick(View view) {
			Class cl = null;
			switch (view.getId()) {
			case R.id.rl_find_jkgc:
				// cl = JkgcActivity.class;
				cl = NewJkgcActivity.class;
				// 健康广场
				// cl = JkgcPlazeActivity.class;
				break;
			case R.id.rl_find_jkzh:
				cl = JkzhActivity.class;
				break;
			case R.id.rl_find_jbzc:
				MobclickAgent.onEvent(FindActivity.this, "B003");
				cl = JbzcActivity.class;
				break;
			case R.id.rl_find_remind:
				cl = RemindListActivity.class;
				break;
			}
			Intent intent = new Intent(FindActivity.this, cl);
			startActivity(intent);
		}
	};


	@Override
	public void preInit() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void loadData() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void initView() {
		rlJkgc = (RelativeLayout) findViewById(R.id.rl_find_jkgc);
		rlJkzh = (RelativeLayout) findViewById(R.id.rl_find_jkzh);
		rlJbzc = (RelativeLayout) findViewById(R.id.rl_find_jbzc);
		rlRemind = (RelativeLayout) findViewById(R.id.rl_find_remind);		
	}

}
